<?php

?>
<?php 
    if($template->get('notfound')!= '')
    {
        echo '<h1 style ="margin-left : 30px;">'.$template->get('notfound').'</h1>';
    }
    if($template->get('sIid') != '')
    {
    ?>
    <div style="width: 100%; height: 80px; ">
        <div style=" margin-left: 30px;">
            <p> 
                <img style="height: 24px;width: 24px; padding-right: 10px; margin-top: 5px;" src="<?php echo URL::getLink('image/folder.png'); ?>">
                <?php
                    $count = 0;
                    $aNameCatelogys = $template->get('aCatelogysname');
                    foreach($aNameCatelogys as $products)
                    {
                        $count += 1;
                        if($template->get('isHome'))
                        {
                            echo '<a href="'.$template->get('isHome').'">'.$products.'<a>';
                        }
                        else
                        {
                            echo '<a href="'.$products['categoryname'].'">'.$products['name'].'<a>';
                        }
                        if($count != count($aNameCatelogys))
                        {
                            echo ' > ';
                        }
                    }

                ?>
            </p>
        </div>
        <div style="margin-left: 70px;">
            <p>
                <img style="height: 24px;width: 24px; padding-right: 10px;" src="<?php echo URL::getLink('image/product.png'); ?>">
                <label style="font-size: 16px; font-weight: bold;"><?php echo $template ->get('name') ?></label></p>
        </div>
    </div>
    <?php
    }
?>
<div style="clear: both;"></div>

<?php
    $aParams = array(
        'aProducts' => $template->get('alistproducts') 
    );
    if(isset($_SESSION['defaultProductLayout']))
    {
        $aParams['layout'] = $_SESSION['defaultProductLayout'];
    }
    includeBlock('block/productBlock', $aParams); 
?>
